#@adminLayout() #define main()
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-edit" >
			<input id="ccode" name="ccode"  type="hidden"  />
			<input id="c_pro" name="c_pro"  type="hidden"  />
			<div class="form-group">
				<label class="col-sm-2 control-label">登录名：</label>
				<div class="col-sm-4">
					<input class="form-control" type="text" name="user_num" required>
				</div>
				<label class="col-sm-2 control-label">口令：</label>
				<div class="col-sm-4">
					<input class="form-control" type="password" name="cpass" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">用户名：</label>
				<div class="col-sm-4">
					<input class="form-control" type="text" name="cname" required>
				</div>
				<label class="col-sm-2 control-label">所属部门：</label>
				<div class="col-sm-4">
					<div class="input-group">
						<input type="hidden" name="cdept" id="cdept" >
						<input class="form-control" type="text" name="cdeptname" id="cdeptname" onclick="selectDeptTree()">
						<span class="input-group-addon"  onclick="selectDeptTree()"><i class="fa fa-search"></i></span>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">职位：</label>
				<div class="col-sm-4">
					<input class="form-control" type="text" name="user_pos" >
				</div>
				<label class="col-sm-2 control-label">排序码：</label>
				<div class="col-sm-4">
					<input class="form-control" type="number" name="isort" >
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">电话：</label>
				<div class="col-sm-4">
					<input class="form-control" type="text" name="ctel" >
				</div>
				<label class="col-sm-2 control-label">手机：</label>
				<div class="col-sm-4">
					<input class="form-control" type="text" name="cphone" >
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">邮箱：</label>
				<div class="col-sm-4">
					<input class="form-control" type="text" name="cemail" >
				</div>
				<label class="col-sm-2 control-label">企业主管：</label>
				<div class="col-sm-4">
					<!-- <input class="form-control" type="text" name="is_ld" > -->
					<div class="col-sm-4" style="padding-top:7px;">
						<input type="checkbox" name="is_ld" value="1"/>
					</div>
				</div>
			</div>
			
		</form>
	</div>
	<script type="text/javascript">
		var prefix = "#(ctx)/sysuser";
		var ccode='#(ccode)';
		var c_pro='#(c_pro)';
    	$(function(){
    		$('#ccode').val(ccode);
    		$('#c_pro').val(c_pro);
			$('#form-edit').loadForm(prefix+'/getData?ccode='+ccode);
    	});
    	
		function submitHandler() {
        	
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/save", $('#form-edit').serialize());
	        }
	    }
		

        /* 用户管理-修改-选择部门树 */
        function selectDeptTree() {
            var url = "#(ctx)/sysorg/select?c_pro="+c_pro;
		    var options = {
				title: '选择部门',
				width: "380",
				url: url
			};
			//$.modal.openOptions(options);
			openWin("选择部门",url,380);
		}
		
		function doSubmit(treeId, treeName){
   			$("#cdept").val(treeId);
   			$("#cdeptname").val(treeName);
		}
	</script>
</body>
#end
